#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int arr[3][3];
	int i = 0;
	int j = 0;
	int x = 0;
	int y = 0;
	int middle = 0;
	int max = arr[0][0];
	for (i = 0; i < 3; i++)
	{
		for (j = 0; j < 3; j++)
		{
			scanf("%d", &arr[i][j]);
		}
	}
	for(i = 0;i < 3; i++)
	{
		for (j = 0; j < 3; j++)
		{
			if (arr[i][j] > max)
			{
				max = arr[i][j];
			}
		}
	}
	for (i = 0; i < 3; i++)
	{
		for (j = 0; j < 3; j++)
		{
			if (max == arr[i][j])
			{
				x = i;
				y = j;
			}
		}
	}
	printf("%d %d %d", x+1, y+1,max);
	return 0;
}